package com.ming.sportdemo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ming.sportdemo.bean.Order;
import com.ming.sportdemo.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface OrderDao extends BaseMapper<Order> {
    public int addOrder(Order order);
    public List<Order> getAllOrder(@Param("userId")String username, @Param("pageStart") int pageStart, @Param("pageSize")int pageSize);
    public int getOrderCounts(@Param("userId")String userId);
    public int deleteOrder(@Param("orderId") int orderId);
    public int updateOrder(Order order);
    int updateOrderState(@Param("orderId")int orderId);
    public int updateOrderStates(@Param("orderId") Integer orderId,@Param("orderState") Boolean orderState);
}
